/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package control;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;

/**
 *
 * @author Jonas
 */
public class DBLogin {

    private Connection conn;
    private Statement stmt;

    public DBLogin() throws SQLException, ClassNotFoundException {
        login();
    }

    public void login() throws SQLException, ClassNotFoundException {
        Class.forName("com.mysql.jdbc.Driver");
        String url = "jdbc:mysql://localhost:3306/FridgeVentory";
        conn = DriverManager.getConnection(url, "root", "root");
        stmt = conn.createStatement();
    }

    public Connection getConn() {
        return conn;
    }

    public Statement getStmt() {
        return stmt;
    }
}
